
* ============================================================================================================
* Replication Do-File for Democratization-Article "Consistencz in Constitutional Design and its Effect on Democracy "
* by Anna Fruhstorfer, 13.02.2019
* ============================================================================================================



* ====================================================
* Data
* ====================================================


use "Data_Fruhstorfer_Democratization.dta" 


gen y=substr(Country,4,4)
destring y, gen(year)
gen country=substr(Country,1,3)
egen cid=group(country)

xtset cid year
gen regime=.

replace regime=1 if Parl ==1
replace regime=2 if PremPres ==1
replace regime=3 if PresPrem==1


* ====================================================
* Table 2
* ====================================================


gen Vdemlag3=Vdem[_n-3]

xtreg Vdem ETHFRA ENP GDPr i.regime COND AGE region, re
xtreg Vdem Vdemlag3 ETHFRA ENP GDPr i.regime COND AGE region, re
xtreg Vdem  ETHFRA ENP GDPr i.regime##COND AGE region, re
xtreg Vdem Vdemlag3 ETHFRA ENP GDPr i.regime##COND AGE region, re
margins, dydx(COND) at(regime=(1(1)3))


* ====================================================
* Table 3
* ====================================================


gen FHIlag3=FHI[_n-3]

xtreg FHI ETHFRA ENP GDPr i.regime COND AGE region, re
estimates store randomlawols
xtreg FHI ETHFRA ENP GDPr i.regime##COND AGE region, re
xtreg FHI FHIlag3 ETHFRA ENP GDPr i.regime COND AGE region, re
xtreg FHI FHIlag3 ETHFRA ENP GDPr i.regime##COND AGE region, re
margins, dydx(COND) at(regime=(1(1)3))


* ====================================================
* Table 4
* ====================================================


gen ROLlag3=ROLre[_n-3]
xtreg ROLre ETHFRA ENP GDPr i.regime COND AGE region, re
estimates store randomlawols
xtreg ROLre ETHFRA ENP GDPr i.regime##COND AGE region, re
xtreg ROLre ROLlag3 ETHFRA ENP GDPr i.regime COND AGE region, re
xtreg ROLre ROLlag3 ETHFRA ENP GDPr i.regime##COND AGE region, re
margins, dydx(COND) at(regime=(1(1)3))


* ====================================================
* Table 5
* ====================================================


gen hoacclag3=hoaccrev[_n-3]


xtreg hoaccrev ETHFRA ENP GDPr i.regime COND AGE region, re
estimates store randomlawols
xtreg hoaccrev ETHFRA ENP GDPr i.regime##COND AGE region, re
xtreg hoaccrev hoacclag3 ETHFRA ENP GDPr i.regime COND AGE region, re
xtreg hoaccrev hoacclag3 ETHFRA ENP GDPr i.regime##COND AGE region, re
margins, dydx(COND) at(regime=(1(1)3))

